package File

import (
	"errors"
	"os"
	"path/filepath"
	"strings"
)

func GetFile当前程序运行路径()(string,error)  {
	dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
	if err != nil {
		return "", err
	}
	return strings.Replace(dir, "\\", "/", -1),nil
}

func GetFile当前程序运行路径2()(string,error)  {
	str, err := os.Getwd()
	if err != nil {
		return "",errors.New("获取当前目录路径失败")
	}
	return str,nil
}
